import React, { lazy, Suspense } from "react";
//我的信息
const MyInformation = lazy(() => import("pages/my/information/myInformation/myInformation"));
const HyInformation = lazy(() => import("pages/my/information/hyInformation/hyInformation"));
const SystemInformation = lazy(() => import("pages/my/information/systemInformation/systemInformation"));
const Wyconsultation = lazy(() => import("pages/my/information/wyconsultation/wyconsultation"));
//个人消息
const MyProfile = lazy(() => import("pages/my/personal information/myProfile/myProfile"));
const SetPicture = lazy(() => import("pages/my/personal information/setPicture/setPicture"));
const Personalized = lazy(() => import("pages/my/personal information/personalized/personalized"));
const CheckoutPicture = lazy(() => import("pages/my/personal information/checkoutPicture/checkoutPicture"));
const SelectPicture = lazy(() => import("pages/my/personal information/selectPicture/selectPicture"));
//我的
const MyD = lazy(() => import("pages/my/myD/myD"));
//设置自动回复
const AutoReply = lazy(() => import("pages/my/autoReply/autoReply"));
const MyLogin = lazy(() => import("pages/Mylogin"));
// 咨询列表
const Conversationalchat = lazy(() => import('../pages/Consultationinformation/ListofinFormation'))
//查看评价
const CheckoutThereViews = lazy(() => import('../pages/Consultationinformation/CheckoutThereViews'))
//对话聊天
const ConversatTionalchat = lazy(() => import('../pages/Consultationinformation/ConversatTionalchat'))
//礼物列表
const GiftList = lazy(() => import('../pages/Consultationinformation/GiftList'))
//历史问诊
const HistoricalConsultation = lazy(() => import('../pages/Consultationinformation/HistoricalConsultation'))
//问诊聊天记录
const InterviewChatHistory = lazy(() => import('../pages/Consultationinformation/InterviewChatHistory'))
//咨询列表
const ListofinFormation = lazy(() => import('../pages/Consultationinformation/ListofinFormation'))
//患者信息页
const PatientInformationPage = lazy(() => import('../pages/Consultationinformation/PatientInformationPage'))
/////////////////////////////////////////////////////////////////////////////////////////
//启动页
const Start = lazy(() => import("../pages/Lzk_pages/Start"));
//首页
const Home = lazy(() => import("../pages/Lzk_pages/Home"));
//登录
const Login = lazy(() => import("../pages/Lzk_pages/Login"));
/////////////////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////////////////
//病友圈路由
const Patient = lazy(() => import("../pages/Lzk_pages/Patient"));
const Suggestion = lazy(() => import("../pages/Lzk_pages/Suggestion"));
////////////////////////////////////////////////////////////////////////////////////////
interface RouteItem {
  path: string;
  name: string;
  element: React.ReactNode;
  children?: RouteItem[];
}

const routes: {
  path: string;
  name: string;
  element: React.ReactNode;
  children?: RouteItem[];
}[] = [
    //我的

    {
      path: "/myInformation",
      name: "我的消息",
      element: <MyInformation />
    },
    //咨询列表
    {
      path: '/conversationalchat',
      name: 'conversationalchat',
      element: <Conversationalchat />
    },
    // 查看评价
    {
      path: '/checkoutthereviews',
      name: 'checkoutthereviews',
      element: <CheckoutThereViews />,
    },
    //对话聊天
    {
      path: '/conversattionalchat',
      name: 'conversattionalchat',
      element: <ConversatTionalchat />,
    },
    //礼物列表
    {
      path: '/giftlist',
      name: "giftlist",
      element: <GiftList />
    },
    //历史问诊
    {
      path: '/historicalconsultation',
      name: 'historicalconsultation',
      element: <HistoricalConsultation />
    },
    //问诊记录
    {
      path: '/interviewchathistory',
      name: 'interviewchathistory',
      element: <InterviewChatHistory />
    },
    //咨询列表
    {
      path: '/listofinformation',
      name: 'listofinformation',
      element: <ListofinFormation />
    },
    //患者信息页
    {
      path: '/patientinformationpage',
      name: 'patientinformationpage',
      element: <PatientInformationPage />
    }
    ,
    //启动页
    {
      path: "/",
      name: "启动页",
      element: <Start />,
    },
    //首页
    {
      path: "/home",
      name: "首页",
      element: <Home />,
    },
    //登录
    {
      path: "/hyInformation",
      name: "H币入账消息",
      element: <HyInformation />,
    },
    {
      path: "/systemInformation",
      name: "系统消息",
      element: <SystemInformation />,
    },
    {
      path: "/wyconsultation",
      name: "问诊消息",
      element: <Wyconsultation />,
    },
    //个人消息
    {
      path: "/myProfile",
      name: "问诊消息",
      element: <MyProfile />,
    },
    {
      path: "/setPicture",
      name: "设置形象照",
      element: <SetPicture />,
    },
    {
      path: "/personalized",
      name: "自定义形象照",
      element: <Personalized />,
    },
    {
      path: "/checkoutPicture",
      name: "更换形象照",
      element: <CheckoutPicture />,
    },
    {
      path: "/selectPicture",
      name: "选择形象照形式",
      element: <SelectPicture />,
    },
    {
      path: "/myD",
      name: "我的",
      element: <MyD />,
    },
    {
      path: "/autoReply",
      name: "设置自动回复",
      element: <AutoReply />,
    },
    {
      path: "/mylogin",
      name: "登录",
      element: <MyLogin />,
    },
    {
      path: "/login",
      name: "登录",
      element: <Login />,
    },
    /////////////////////////////////////////////////////////////////
    //病友圈路由
    {
      path: "/patient",
      name: "病友圈首页",
      element: (
        <Suspense fallback={<div>loding......</div>}>
          <Patient />
        </Suspense>
      ),
    },
    {
      path: "/suggestion/:id",
      name: "朋友圈建议",
      element: (
        <Suspense fallback={<div>loding......</div>}>
          <Suggestion />
        </Suspense>
      ),
    },
    /////////////////////////////////////////////////////////////////
  ];

export default routes;
